﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CompositionPlugin.Service
{
    public class TaskTime
    {
        public DateTime? EnqueueTime { get; internal set; }

        public DateTime? StartTime { get; internal set; }

        public DateTime? FinishTime { get; internal set; }

        public DateTime? CancalTime { get; internal set; }

        public TimeSpan? WorkingTimeSpan
        {
            get
            {
                if (this.StartTime.HasValue && this.FinishTime.HasValue)
                    return this.FinishTime.Value - this.StartTime.Value;
                else
                    return null;
            }
        }
    }
}
